﻿using System;
using System.Data.Objects;
using System.Data.Objects.DataClasses;
using System.Data.EntityClient;
using System.ComponentModel;
using System.Xml.Serialization;
using System.Runtime.Serialization;
using Entities;

[assembly: EdmSchemaAttribute()]

public partial class DataContextFramework : ObjectContext
{
    #region Constructors

    /// <summary>
    /// Initializes a new FrameWorkEntity object using the connection string found in the 'FrameWorkEntity' section of the application configuration file.
    /// </summary>
    public DataContextFramework()
        : base("name=FwModelContainer", "FwModelContainer")
    {
        
    }

    #endregion

    #region Partial Methods

    partial void OnContextCreated();

    #endregion

    #region ObjectSet Properties

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    public ObjectSet<Authority> AuthoritySet
    {
        get
        {
            if ((_AuthoritySet == null))
            {
                _AuthoritySet = base.CreateObjectSet<Authority>("AuthoritySet");
            }
            return _AuthoritySet;
        }
    }
    private ObjectSet<Authority> _AuthoritySet;

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    public ObjectSet<Banner> BannerSet
    {
        get
        {
            if ((_BannerSet == null))
            {
                _BannerSet = base.CreateObjectSet<Banner>("BannerSet");
            }
            return _BannerSet;
        }
    }
    private ObjectSet<Banner> _BannerSet;

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    public ObjectSet<Category> CategorySet
    {
        get
        {
            if ((_CategorySet == null))
            {
                _CategorySet = base.CreateObjectSet<Category>("CategorySet");
            }
            return _CategorySet;
        }
    }
    private ObjectSet<Category> _CategorySet;

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    public ObjectSet<Contact> ContactSet
    {
        get
        {
            if ((_ContactSet == null))
            {
                _ContactSet = base.CreateObjectSet<Contact>("ContactSet");
            }
            return _ContactSet;
        }
    }
    private ObjectSet<Contact> _ContactSet;

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    public ObjectSet<Customer> CustomerSet
    {
        get
        {
            if ((_CustomerSet == null))
            {
                _CustomerSet = base.CreateObjectSet<Customer>("CustomerSet");
            }
            return _CustomerSet;
        }
    }
    private ObjectSet<Customer> _CustomerSet;

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    public ObjectSet<News> NewsSet
    {
        get
        {
            if ((_NewsSet == null))
            {
                _NewsSet = base.CreateObjectSet<News>("NewsSet");
            }
            return _NewsSet;
        }
    }
    private ObjectSet<News> _NewsSet;

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    public ObjectSet<Order> OrderSet
    {
        get
        {
            if ((_OrderSet == null))
            {
                _OrderSet = base.CreateObjectSet<Order>("OrderSet");
            }
            return _OrderSet;
        }
    }
    private ObjectSet<Order> _OrderSet;

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    public ObjectSet<OrderDetail> OrderDetailSet
    {
        get
        {
            if ((_OrderDetailSet == null))
            {
                _OrderDetailSet = base.CreateObjectSet<OrderDetail>("OrderDetailSet");
            }
            return _OrderDetailSet;
        }
    }
    private ObjectSet<OrderDetail> _OrderDetailSet;

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    public ObjectSet<Product> ProductSet
    {
        get
        {
            if ((_ProductSet == null))
            {
                _ProductSet = base.CreateObjectSet<Product>("ProductSet");
            }
            return _ProductSet;
        }
    }
    private ObjectSet<Product> _ProductSet;
    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    public ObjectSet<QuestionAnswer> QuestionAnswerSet
    {
        get
        {
            if ((_QuestionAnswerSet == null))
            {
                _QuestionAnswerSet = base.CreateObjectSet<QuestionAnswer>("QuestionAnswerSet");
            }
            return _QuestionAnswerSet;
        }
    }
    private ObjectSet<QuestionAnswer> _QuestionAnswerSet;

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    public ObjectSet<Role> RoleSet
    {
        get
        {
            if ((_RoleSet == null))
            {
                _RoleSet = base.CreateObjectSet<Role>("RoleSet");
            }
            return _RoleSet;
        }
    }
    private ObjectSet<Role> _RoleSet;

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    public ObjectSet<Service> ServiceSet
    {
        get
        {
            if ((_ServiceSet == null))
            {
                _ServiceSet = base.CreateObjectSet<Service>("ServiceSet");
            }
            return _ServiceSet;
        }
    }
    private ObjectSet<Service> _ServiceSet;

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    public ObjectSet<User> UserSet
    {
        get
        {
            if ((_UserSet == null))
            {
                _UserSet = base.CreateObjectSet<User>("UserSet");
            }
            return _UserSet;
        }
    }
    private ObjectSet<User> _UserSet;

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    public ObjectSet<WebPage> WebPageSet
    {
        get
        {
            if ((_WebPageSet == null))
            {
                _WebPageSet = base.CreateObjectSet<WebPage>("WebPageSet");
            }
            return _WebPageSet;
        }
    }
    private ObjectSet<WebPage> _WebPageSet;

    /// <summary>
    /// No Metadata Documentation available.
    /// </summary>
    public ObjectSet<AboutUS> AboutUSSet
    {
        get
        {
            if ((_AboutUSSet == null))
            {
                _AboutUSSet = base.CreateObjectSet<AboutUS>("AboutUSSet");
            }
            return _AboutUSSet;
        }
    }
    private ObjectSet<AboutUS> _AboutUSSet;

    #endregion
    #region AddTo Methods

    /// <summary>
    /// Deprecated Method for adding a new object to the AuthoritySet EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
    /// </summary>
    public void AddToAuthoritySet(Authority authority)
    {
        base.AddObject("AuthoritySet", authority);
    }

    /// <summary>
    /// Deprecated Method for adding a new object to the BannerSet EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
    /// </summary>
    public void AddToBannerSet(Banner banner)
    {
        base.AddObject("BannerSet", banner);
    }

    /// <summary>
    /// Deprecated Method for adding a new object to the CategorySet EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
    /// </summary>
    public void AddToCategorySet(Category category)
    {
        base.AddObject("CategorySet", category);
    }

    /// <summary>
    /// Deprecated Method for adding a new object to the ContactSet EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
    /// </summary>
    public void AddToContactSet(Contact contact)
    {
        base.AddObject("ContactSet", contact);
    }

    /// <summary>
    /// Deprecated Method for adding a new object to the CustomerSet EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
    /// </summary>
    public void AddToCustomerSet(Customer customer)
    {
        base.AddObject("CustomerSet", customer);
    }

    /// <summary>
    /// Deprecated Method for adding a new object to the NewsSet EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
    /// </summary>
    public void AddToNewsSet(News news)
    {
        base.AddObject("NewsSet", news);
    }

    /// <summary>
    /// Deprecated Method for adding a new object to the OrderSet EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
    /// </summary>
    public void AddToOrderSet(Order order)
    {
        base.AddObject("OrderSet", order);
    }

    /// <summary>
    /// Deprecated Method for adding a new object to the OrderDetailSet EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
    /// </summary>
    public void AddToOrderDetailSet(OrderDetail orderDetail)
    {
        base.AddObject("OrderDetailSet", orderDetail);
    }

    /// <summary>
    /// Deprecated Method for adding a new object to the ProductSet EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
    /// </summary>
    public void AddToProductSet(Product product)
    {
        base.AddObject("ProductSet", product);
    }

    /// <summary>
    /// Deprecated Method for adding a new object to the QuestionAnswerSet EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
    /// </summary>
    public void AddToQuestionAnswerSet(QuestionAnswer questionAnswer)
    {
        base.AddObject("QuestionAnswerSet", questionAnswer);
    }

    /// <summary>
    /// Deprecated Method for adding a new object to the RoleSet EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
    /// </summary>
    public void AddToRoleSet(Role role)
    {
        base.AddObject("RoleSet", role);
    }

    /// <summary>
    /// Deprecated Method for adding a new object to the ServiceSet EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
    /// </summary>
    public void AddToServiceSet(Service service)
    {
        base.AddObject("ServiceSet", service);
    }

    /// <summary>
    /// Deprecated Method for adding a new object to the UserSet EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
    /// </summary>
    public void AddToUserSet(User user)
    {
        base.AddObject("UserSet", user);
    }

    /// <summary>
    /// Deprecated Method for adding a new object to the WebPageSet EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
    /// </summary>
    public void AddToWebPageSet(WebPage webPage)
    {
        base.AddObject("WebPageSet", webPage);
    }

    /// <summary>
    /// Deprecated Method for adding a new object to the AboutUSSet EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
    /// </summary>
    public void AddToAboutUSSet(AboutUS aboutUS)
    {
        base.AddObject("AboutUSSet", aboutUS);
    }

    #endregion
}

